<?php $this->load->view('layout/header'); ?>
<script src="/static/bk/js/table.js" type="text/javascript"></script>
    <div id="container">
        <!--查询表单开始-->
        <div id="DivQuery">
            <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
            </div>
            <div id="floatBox" class="floatBox">
                <div id="drag" class="title" onmousedown="DragDialog()">
                    <h4>
                        查询</h4>
                    <span>关闭</span></div>
                <div class="content">
                    <form action="<?php echo b_url('message/index')?>" method='post' >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                昵称：
                            </td>
                            <td>
                                <input name="nickname" type="text" id="nickname" />
                            </td>
                            <td style="width: 15%" align="right">
                                留言内容：
                            </td>
                            <td>
                                <input name="bookcontent" type="text" id="bookcontent" />
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                是否回复：
                            </td>
                            <td>
                                <span id="radIsReply">
                                    <input id="radIsReply_0" type="radio" name="isreply" value="" checked="checked" /><label for="radIsReply_0">不限</label>
                                    <input id="radIsReply_1" type="radio" name="isreply" value="0" /><label for="radIsReply_1">未回复</label>
                                    <input id="radIsReply_2" type="radio" name="isreply" value="1" /><label for="radIsReply_2">已回复</label>
                                </span>
                            </td>
                            <td style="width: 15%" align="right">
                                是否关闭：
                            </td>
                            <td>
                                <span id="radIsClose">
                                    <input id="radIsClose_0" type="radio" name="isclose" value="" checked="checked" /><label for="radIsClose_0">不限</label>
                                    <input id="radIsClose_1" type="radio" name="isclose" value="0" /><label for="radIsClose_1">开放</label>
                                    <input id="radIsClose_2" type="radio" name="isclose" value="1" /><label for="radIsClose_2">关闭</label>
                                </span>
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                                <input type="submit" value="查询" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    </form>
                </div>
            </div>
        </div>
        <!--查询表单结束-->
        <!--导航开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_nav">
            <tr>
                <td>
                    留言管理&gt;管理列表
                </td>
            </tr>
        </table>
        <!--导航结束-->
        <!--操作选项开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
            <tr>
                <td>
                    操作选项：
                    <a id="lbtnAdd" href="<?php echo b_url('message/add_message')?>">添加留言</a>
                    <a onclick="javascript:return checkEdit(this);" name="GuestbookID" src="<?php echo b_url('message/add_message')?>/" href="javascript:;" id="lbtnEdit" >回复留言</a>
                    <a onclick="javascript:return checkOperate(this);" name="GuestbookID" src="<?php echo b_url('message/edit_close/index/guestbookid/guestbook/0/')?>" id="lbtnOpen" href="javascript:__doPostBack(&#39;lbtnOpen&#39;,&#39;&#39;)">开放留言</a>
                    <a onclick="javascript:return checkOperate(this);" name="GuestbookID"  src="<?php echo b_url('message/edit_close/index/guestbookid/guestbook/1/')?>" href="javascript:__doPostBack(&#39;lbtnClose&#39;,&#39;&#39;)">关闭留言</a>
                    <a onclick="javascript:return checkDel(this);" name="GuestbookID" src="<?php echo b_url('message/delete_info/index/guestbookid/guestbook/')?>" id="lbtnDel" href="javascript:__doPostBack(&#39;lbtnDel&#39;,&#39;&#39;)">删除留言</a>
                    <a href="javascript:SearchDialog()">查询留言</a>
                </td>
            </tr>
        </table>
        <!--操作选项结束-->
        <!--列表开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
            <tr class="table_list_title">
                <td style="width: 2%">
                    <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'GuestbookID')" />
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=GuestbookID&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    编号<img src="../Themes/Images/up.gif"/>
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=NickName&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    昵称
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=BookContent&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    留言内容
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    留言时间
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=IsReply&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    是否回复
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1')" title="点击排序">
                    状态
                </td>
            </tr>
                <?php foreach($list as $k=>$v): ?>
                    <tr class="table_list_row_normal">
                        <td style="width: 2%">
                            <input name="GuestbookID" type="checkbox" id="GuestbookID" value="<?php echo $v['guestbookid']?>" onclick="javascript:TrColor2('GuestbookID',1)" />
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <?php echo $v['guestbookid']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <a href="Guestbook_Add.aspx?GuestbookID=2&OrderKey=GuestbookID&AscDesc=asc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1"><?php echo $v['nickname']?></a>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <a href="Guestbook_Add.aspx?GuestbookID=2&OrderKey=GuestbookID&AscDesc=asc&txtNickName=&txtBookContent=&radIsReply=-1&radIsClose=-1&page=1"><?php echo $v['bookcontent']?></a>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <?php echo $v['addtime']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <?php 
                                if($v['isreply'] == 0){
                                    echo '未回复';
                                }elseif($v['isreply'] == 1){
                                    echo '已回复';
                                }
                            ?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('GuestbookID',1)">
                            <?php 
                                if($v['isclose'] == 0){
                                    echo '开放';
                                }elseif($v['isclose'] == 1){
                                    echo '<font color="red">关闭</font>';
                                }
                            ?>
                        </td>
                    </tr>
                <?php endforeach; ?>
        </table>
        <!--列表结束-->
        <!--分页开始-->
        <?php $pagination->show();?>
        <!--分页结束-->
    </div>
    </form>
<?php $this->load->view('layout/footer'); ?>

